package com.htstar.ovms.device.api.entity;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@ApiModel(value = "设备升级记录")
@TableName("device_ota")
public class DeviceOta extends Model<DeviceOta> {

    @ApiModelProperty(value = "表唯一ID,自增")
    @TableId
    private Integer id;

    @ApiModelProperty(value = "设备号")
    private String deviceSn;

    @ApiModelProperty(value = "指令发送状态")
    private Integer sendResult;

    @ApiModelProperty(value = "设备升级结果")
    private Integer updateResult;

    @ApiModelProperty(value = "用于下发的16进制数据")
    private String data;

    @ApiModelProperty(value = "设备升级失败次数")
    private Integer failureTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "holdon")
    private Integer holdOn;


    @ApiModelProperty(value = "绑定时间")
    private LocalDateTime bindTime;

    @ApiModelProperty(value = "当前状态")
    private Integer otaStatus;
}
